# 从selenium导入webdriver
from selenium import webdriver
from bs4 import BeautifulSoup
import time


ChromeDriverPath = "/home/nc/download/google/chromedriver"
# 获取Chrome驱动
driver = webdriver.Chrome(executable_path=ChromeDriverPath)	
url = "https://www.baidu.com"
# 获取url界面
driver.get(url)	
# 将HTML页面内容使用Beautiful解析
soup = BeautifulSoup(driver.page_source, "lxml")	
# 保持浏览器界面10s
time.sleep(10)
#浏览器可以同时打开多个界面，close只关闭当前界面，不退出浏览器
driver.close()
#退出整个浏览器
driver.quit()